<!DOCTYPE HTML>
<html>
  <head>
    <title>My Arunachal</title>
        <link rel="SHORTCUT ICON" href="img/favicon.ico" />
        <script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key="></script>
        <script type="text/javascript" src="jquery/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="jquery/jquery.gmap-1.1.0-min.js"></script>
        <script type="text/javascript" src="jquery/jquery.gmap-1.1..js"></script>
        <script type="text/javascript" src="jquery/slides.jquery.js"></script>  
	<?php include("html/meta.html"); ?>        
		<link rel="stylesheet" href="css/style.css" />
        <link rel="stylesheet" href="css/grid-12.css" />
        <script type="text/javascript" language="javascript">
          $('document').ready(function() {
              $("#slides").slides({
              preload: true,
              preloadImage: '/img/loading.gif',
              play: 5000,
              pause: 2500,
              hoverPause: true
            });
            
              $("#map").gMap({ markers: [{ latitude: 26.125003,
                              longitude: 91.798775,
                              html: "<div style='width:40px;'>Kunuki</div>",
                              popup: false }],
                  zoom: 13 });
             
             
    		});        
				</script>
  </head>
  <body>

    <div id="container" class="container_12">
    
    <?php
    include("inc/db.class.php");
	include("inc/functions.php");
    require("php/header.php");
    $database = new database();
    ?>
      <div id="slides" class="grid_12">
        <div class="slides_container">

        <?php
          $get_banner = "select * from banner where `show` = 1 and `is_deleted`=0 order by `order`";
          foreach($database->get_records($get_banner) as $banner){
          echo "<div style='width: 940px; height: 350px;'><img style='z-index: 10;' src='".$banner->path."' width='940' height='300' /><p style = 'margin-top: -20px; z-index: 1000;'>".$banner->title."</p></div>";
          }
        ?>
        </div>        
        
      </div>
	<div id="" class="grid_4 place-holder"><a href="forum/">
		<h3>Forum</h3>
		<div class="place-holder-description">
		This is a simple description, and this text should come to next line.
		</div>
		</a>
	</div>
	<div id="" class="grid_4 place-holder"><a href="gallery.php">
		<h3>Gallery</h3>
		<div class="place-holder-description">
		This is a simple description, and this text should come to next line.
		</div>
		</a>
	</div>
	<div id="" class="grid_4 place-holder"><a href="videos.php">
		<h3>Videos</h3>
		<div class="place-holder-description">
		This is a simple description, and this text should come to next line.
		</div>
		</a>
	</div>
	
	
	<div id="" class="grid_4">
	<h3><a href="#">Editorial</a></h3>
	<div class="place-holder2-description"></div>
	Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries
	</div>
	<div id="" class="grid_4">
	<h3><a href="announcement_list.php">Announcements</a></h3>
	<div class="">
	
	<?php
          $get_announcement = "select * from announcements order by modified_at desc LIMIT 3";
          foreach($database->get_records($get_announcement) as $announcement){
		  echo $announcement->title."</br></br>";
         }
    ?>
		
	</div>
	</div>
      <div id="" class="grid_4">
	  <h3><a href="event_list.php">Events</a> (Tell the world about your events) </h3>
	  
		<?php 


$query = "select * from events order by start_date asc LIMIT 3";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
	//$date = new DateTime();
	//$date->setTimestamp($row['start_date']);
	$month = date('M', strtotime($row['start_date']));
	//$month = $date->format('M');
	$day = date('d', strtotime($row['start_date']));
	$start_time = date('H:i', strtotime($row['start_date']));
	
	//$date->setTimestamp($row['end_date']);
	$end_time = date('H:i', strtotime($row['end_date']));

	
	echo '<div class="event">
			<div class="event_time" style="float:left">
				<div class="event_day event_month">'.$month.'</div>
				<div class="event_day event_date">'.$day.'</div>
			</div>
            <div class="event_detail" style="float:left">
				<div class="title">'.shorten($row['title'], 30).'</div>
				<div class="title"><b>Time:</b> '.$start_time.' to '.$end_time.'</div>
				<div class="title"><b>Venue:</b> '.shorten($row['venue'], 20).'</div>
			</div>
         </div>';
	  
         echo '<div class="clear"></div>';
}
?>
      
      </div>
	  
	 
      <div id="footer" class="grid_12">  
        &copy <?php $start_year='2014'; if(date('Y')<=$start_year) echo date('Y'); else echo $start_year." - ".date('Y')?> My Arunachal 
      </div>
    </div>
  </body>
</html>
